#include <iostream>

using namespace std;

class Date
{
	friend ostream& operator<<(ostream& _cout, const Date& d);
	friend istream& operator>>(istream& _cin, Date& d);
public:
	Date(int year = 1900, int month = 1, int day = 1)
		: _year(year)
		, _month(month)
		, _day(day)
	{}
private:
	int _year;
	int _month;
	int _day;
};

ostream& operator<<(ostream& _cout, const Date& d)
{
	_cout << d._year << "-" << d._month << "-" << d._day;
	return _cout;
}

istream& operator>>(istream& _cin, Date& d)
{
	_cin >> d._year;
	_cin >> d._month;
	_cin >> d._day;
	return _cin;
}

class A
{
	friend class B;
public:
	A(int a = 0)
	{
		_a = a;
	}

private:
	int _a;
};

class B
{
public:
	B(int b = 1)
	{
		_b = b;
	}
	void func()
	{
		aa._a++;
	}
private:
	int _b;
	A aa;
};

//class B
//{
//public:
//	B(int b = 1)
//	{
//		_b = b;
//	}
//
//private:
//	int _b;
//};
//
//class A
//{
//	friend class B;
//public:
//	A(int a = 0)
//	{
//		_a = a;
//	}
//	void func()
//	{
//		bb._b++;
//	}
//
//private:
//	int _a;
//	B bb;
//};

void Test1()
{
	Date d1;
	Date d2;
	cin >> d1;
	cin >> d2;
	cout << d1 << endl;
	cout << d2 << endl;
}

//void Test2()
//{
//	B bb;
//	bb.func();
//
//}

//void Test3()
//{
//	A aa;
//	aa.func();
//}

int main()
{
	//Test1();

	//Test2();

	//Test3();
	return 0;
}